<template>
  <el-dialog :title="form.id?'修改学科':'添加学科'" :visible.sync="dialogVisible" width="400px">
    <!-- 表单 添加前置空 修改的时候填充 -->
    <el-form-item ref="form" label-width="80px" :model="form" :rules="rules">
      <el-input v-model="form.subjectName" placeholder="请输入学科名称"></el-input>
    </el-form-item>
    <el-form-item label="是否显示">
      <el-switch
        v-model="form.isFrontDisplay"
        active-color="#13ce66"
        inactive-color="#ff4949"
        :active-value="1"
        :inactive-value="0"
        ></el-switch>
    </el-form-item>
    <span slot="footer" class="dialog-footer">
      <el-button @click="dialogVisible = false">取消</el-button>
      <el-button type="primary" @click="confirm()">确定</el-button>
    </span>
  </el-dialog>
</template>

<script>
import { add, update } from '@/api/hmmm/subjects.js'
export default {
}
</script>

<style scoped lang='less'></style>